package com.zxkj.domain.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;

@Embeddable
public class CorporationMapDeptAuPK implements Serializable {
    public CorporationMapDeptAuPK() {
    }

    public CorporationMapDeptAuPK(Integer deptId, String auId) {
        this.deptId = deptId;
        this.auId = auId;
    }

    private static final long serialVersionUID = -2432145316543676L;
    @Column(nullable = false)
    private Integer deptId;
    @Column(nullable = false)
    private String auId;

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getAuId() {
        return auId;
    }

    public void setAuId(String auId) {
        this.auId = auId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CorporationMapDeptAuPK that = (CorporationMapDeptAuPK) o;

        if (deptId != null ? !deptId.equals(that.deptId) : that.deptId != null) return false;
        return auId != null ? auId.equals(that.auId) : that.auId == null;
    }

    @Override
    public int hashCode() {
        int result = deptId != null ? deptId.hashCode() : 0;
        result = 31 * result + (auId != null ? auId.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "CorporationMapDeptAuPK{" +
                "deptId=" + deptId +
                ", auId=" + auId +
                '}';
    }
}
